﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SmartSpace.Core
{
    public class VirtualPage
    {
        public Guid Id { get; set; }
        public Guid AppId { get; set; }
        public string Code { get; set; }
        public string Caption { get; set; }

        //public Layout Layout { get; set; }
        public PageTemplate Template { get; set; }
        public Guid TemplateId { get; set; }

        /// <summary>
        /// Whether inherited site navigation list
        /// <para>true:inherited</para>
        /// <para>false:not inherited</para>
        /// </summary>
        public bool IsInheritedSiteNavigation { get; set; }
    }

    public class Layout
    {
        public Guid Id { get; set; }
        public Guid PageId { get; set; }

        public List<Cell> RowDefinitions { get; set; }
        public List<Cell> ColDefinitions { get; set; }
    }

    public class Cell
    {
        public Guid LayoutId { get; set; }

        public int Index { get; set; }
        public double Size { get; set; }
        public LayoutUnitType SizeType { get; set; }
    }

    public enum LayoutUnitType
    {
        Auto = 0,
        Pixel = 1,
        Star = 2,
    }

    public class LayoutTemplate
    {
        public Guid Id { get; set; }
        public List<CellTemplate> RowDefinitions { get; set; }
        public List<CellTemplate> ColDefinitions { get; set; }
    }

    public class CellTemplate
    {
        public Guid TemplateId { get; set; }

        public int Index { get; set; }
        public double Size { get; set; }
        public LayoutUnitType SizeType { get; set; }
    }

    /// <summary>
    /// template page
    /// </summary>
    public class TemplatePage
    {
    }
}
